<template>
    <div>
        <p> 我是子组件</p>
        <!-- 使用孙子组件 -->
        <Cartgrandson></Cartgrandson>
    </div>
</template>

<script setup lang="ts">
// 引入子组件
import Cartgrandson from '@/components/Cartgrandson.vue'
import { key } from '@/views/mykey'
import { inject } from 'vue';
const girlobj = inject(key);
console.log('girlobj', girlobj);


</script>
<style scoped></style>